package com.example.demo.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@Controller
@RequestMapping("admin")
public class HelloController {
    @RequestMapping("/hello")
   // @ResponseBody
    public String hello(Model model, HttpServletRequest request, HttpServletResponse response){
        model.addAttribute("level",1);
        model.addAttribute("name","张三");
        System.out.println("aaa");
        return "/admin/hello";
    }
}
